from typing import Optional

from ninja import Schema, Field, FilterSchema
from rest_framework.serializers import ModelSerializer

from models.models import RegionInfo


class UpdateUserNickNameSchema(Schema):
    nickname: str = Field(default="", description="昵称")
    avatar: str = Field(default="", description="头像")


class GetQrCodeSchema(Schema):
    page: str = Field(default="", description="页面路径")


class GetShareLinkSchema(Schema):
    page: str = Field(default="", description="页面路径")
    title: str = Field(default="", description="分享标题")


class UserAddWaterDropNumberSchema(Schema):
    water_drop_number: int = Field(default=0, description="水滴数")


class WaterDropletsRecordFilter(FilterSchema):
    op_type: Optional[int] = Field(None, description="操作类型")

